#include <stdio.h>
#include <syscall.h>

int main(int argc UNUSED, char * argv[] UNUSED)
{
	char buf[] = "test test test test test test";
	wait(exec("deny_c"));

	int child_file = open("deny_c");
	int written = write(child_file, buf, 30);
	if(written == -1)
	{
		printf("Parent : can't write into deny_c\n");
		return -1;
	}
	else
	{
		printf("Parent : Write success %d bytes\n",written);
		return 0;
	}
}
